<template>
  <view>count:{{ count }} <slot/></view>
</template>
<script setup>
import { computed, ref } from 'vue';

const props = defineProps({
    defaultCount:{
        type:Number,
        default:0
    }
})
const emits = defineEmits(['onCountChange'])
const count = ref(props.defaultCount);


setTimeout(() => {
  count.value++
  emits('onCountChange', count.value)
}, 1000)
</script>

